package tech.aistar.corejava.day10.homework;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/27 0027
 */
public class TestFinallyDemo {
    public static String output = "";

    public static void foo(int i){
        try{
            if(i ==1){
                throw new Exception();
            }
            output +="1";//1342
        }catch(Exception e){
            output += "2";
            return;
        }finally{
            output += "3";
        }
        output += "4";

    }

    public static void main(String[] args){
        foo(0);
        foo(1);

        System.out.println(output);
    }
}
